package org.vectrics.common.util;

import java.util.*;
import org.apache.log4j.Category;
import org.vectrics.common.util.PageList;


public class TestPageList extends PageList {
    private static Category log = Category.getInstance(TestPageList.class);


    public TestPageList() {
    }
    
    protected Vector findKeys()
    {    
        Vector userNames = new Vector();
        for (int i = 0; i < 1000; i++) {
            userNames.add("user_" + i);
        }
        
        return(userNames);
    }

    protected Vector loadObjects(Vector userNames) {
        log.debug("loadObjects() - called");
        Vector items = new Vector();
        if (userNames == null) {
            log.warn("loadObjects() - NULL userNames passed.");
        }
        else {
            for (int i = 0; i < userNames.size(); i++) {
                log.debug("loadObjects() - getting object at: " + i);
                String userName = (String)userNames.elementAt(i);
                log.debug("adding item: " + userName);
                items.add(userName);
            }
        }
        log.debug("loadObjects() - item count = " + items.size());
        
        return(items);
    }
        
}    

